import styles from './styles.less';
import SearchForm from './components/SearchForm';
import DataTable from './components/DataTable';
import {useState} from 'react';
import DataForm from './components/DataForm';
import ResetPassForm from './components/ResetPassForm';

const App = () => {

  const [tablePayload, setTablePayload] = useState({pageNum: 1, pageSize: 15, param: {}});
  const [dataForm, setDataForm] = useState(undefined);
  const [resetPassForm, setResetPassForm] = useState(undefined);

  return (
    <div className={styles.myContainer}>
      <ResetPassForm data={{resetPassForm, setResetPassForm, tablePayload, setTablePayload}}/>
      <DataForm data={{dataForm, setDataForm, tablePayload, setTablePayload}}/>
      <SearchForm data={{tablePayload, setTablePayload}}/>
      <DataTable data={{setDataForm, tablePayload, setTablePayload, setResetPassForm}}/>
    </div>
  );
};

export default App;
